package com.czk.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.czk.mapper.EmploymentMapper;
import com.czk.pojo.Employment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/6/23 16:22
 */
@RestController
@RequestMapping("/em")
public class EmploymentController {
    @Autowired
    private EmploymentMapper employmentMapper;
    @GetMapping("/all")
    public Employment get(){
        QueryWrapper<Employment> wrapper=new QueryWrapper<>();
        wrapper.eq("id",1);
        Employment employment = employmentMapper.selectOne(wrapper);
        return employment;
    }
}
